package com.ctsi.canal.starter.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 同步的处理器
 *
 * @author anank
 * @date 2019/10/28 17:39
 **/
public abstract class AbstractSyncEntryHandler<T> implements EntryHandler<T> {

    private static final Logger log = LoggerFactory.getLogger(AbstractSyncEntryHandler.class);

    @Override
    public void insert(T t) {
        log.info("insert {} : {}", t.getClass(), t.toString());
    }

    @Override
    public void update(T before, T after) {
        log.info("update {}，before : {}", before.getClass(), before.toString());
        log.info("update {}，after : {}", after.getClass(), after.toString());
    }

    @Override
    public void delete(T t) {
        log.info("delete {} : {}", t.getClass(), t.toString());
    }

}
